<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__ROOT__/Public/Css/ehs.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="__TMPL__style/Common.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/core.js"></script>
    <style>
	  optgroup{color:#999999}
	  optgroup option{color:#0066CC}
	</style>
    <title>EHS</title>
  </head>

  <body>
    <layout name="Public:header" cache="0" />
    <div id="container">
      <form id="formUpload" action="__URL__/saveDoc" method="post">
        <table width="100%" border="0">
          <tr>
            <th width="68" align="right">标题：</th>
            <td colspan="5"><input type="text" name="title" value="{$file.title}" style="width:300px"/></td>
          </tr>
          <tr>
            <th align="right">文档简介:</th>
            <td colspan="5"><textarea name="file_info" cols="" style="width:200px; height:120px;">{$file.title}</textarea></td>
          </tr>
          <tr>
            <th align="right">文档标签:</th>
            <td colspan="5"><input type="text" name="tags" /></td>
          </tr>
          <tr>
            <th align="right">行业:</th>
            <td>
              <select id="selHY" name="hy_id"  style=" width:185px;" size="1" >
                <volist name="hzr[0]" id="vo">
                  <optgroup label="{$vo.title}" style="">
                  <volist name="vo.downLine" id="vod">
                    <option value="{$vod.id}">{$vod.title}</option>
                  </volist>
                  </optgroup>
                </volist>
              </select> </td>
            <td><strong>专业</strong></td>
            <td>
              <select id="selZY" name="zy_id"  style="width:185px;" size="1">
                <volist name="hzr[1]" id="vo">
				  <volist name="vo.downLine" id="v">
				  <optgroup label="{$vo.title}:{$v.title}" style="color:#999999">
				  <volist name="v.downLine" id='vl'> 
                    <option value="{$vl.id}" style="color:#0066CC">{$vl.title}</option>
                  </volist>
				  </optgroup>
                </volist>
				</volist>
              </select>

            </td>
            <!--  <td><strong>地区</strong></td>
              <td>
                <select name="zy_id"  style="width:185px;" size="1">
                  <volist name="hzr[2]" id="vo">
                    <option value="{$vo.id}" style="color: red">{$vo.title}</option>
                    <volist name="vo.downLine" id="vod">
                      <option value="{$vod.id}">{$vod.title}</option>
                    </volist>
                  </volist>
                </select>
                <input name="filesize" type="hidden" value="" />
              </td> -->
          </tr>
          <tr>
            <th align="right">语言:</th>
            <td colspan="5">
              <select name="file_language" >
                <option value="中文">中文</option>
                <option value="英文">英文</option>
              </select>
            </td>
          </tr>
          <tr>
            <th align="right">下载:</th>
            <td colspan="5"><span style="font-size:12px;">收费下载 ￥</span><input type="text" style="width:30px;" value="0.00" name="price"/></td>
          </tr>
          <tr>
            <td colspan="6"><div align="center">
                <input name="" value="提交" type="button" onclick="submitDoc()" style="width:60px;" />
              </div></td>
          </tr>
        </table>
        <input type="hidden" name="file_url" value="{$file.file_url}"   />
        <input type="hidden" name="owner_id" value="{$file.owner_id}"   />
        <input type="hidden" name="owner_name" value="{$file.owner_name}" />
        <input name="file_size" type="hidden" value="{$file.file_size}" />
      </form>
      <layout name="Public:footer" cache="1" />
    </div>
    <script>
      var hl = {$hl}, zl = {$zl};
      function submitDoc(){
        for (var i in hl) {
          if($("#selHY").val() == hl[i])
          {
            alert("请选择“行业”分类中红色以外的选项");
            return ;
          }
        }
        for (var i in zl) {
          if($("#selZY").val() == zl[i])
          {
            alert("请选择“专业”分类中红色以外的选项");
            return ;
          }
        }
        $("#formUpload").submit();
      }
    </script>
  </body>
</html>
